<template>
  <div class="box">
    <div id="player"></div>
  </div>
</template>
<script>
export default {
  components: {},
  props: {
    width: {
      type: Number,
      default: 160,
    },
    height: {
      type: Number,
      default: 120,
    },
  },
  data() {
    return {
      player: "",
      url: "ws://47.102.114.143:559/openUrl/9hOBOtq",
    };
  },
  mounted() {
    // 实例化播放器
    this.player = new WasmPlayer(null, "player", this.callbackfun);
    // 调用播放
    this.player.play(this.url, 1);
  },
  methods: {
    callbackfun(e) {},
  },
};
</script>
<style>
.box {
  width: 600px;
  height: 400px;
}
</style>
